package org.dzq.designmode.adapter.classadapter;

/**
 * @ClassName: ClassAdapter
 * @Package: org.dzq.designmode.adapter.classadapter
 * @author: 越
 * @date: 2023/6/13 21:48
 * @Description: 类适配器 ：通过继承被适配者和实现目标接口实现 不符合迪米特原则（最少知道原则）
 */
public class ClassAdapter extends Adaptee implements Target {

    @Override
    public int getPhoneVoltage() {
        int homeVoltage = super.getHomeVoltage();
        int phoneVoltage = homeVoltage/44;
        return phoneVoltage;
    }
}
